package threaddemo;

public class testdemo {
    public static void main(String[] args) {
        MyRunable m1 = new MyRunable();

        Thread t1 = new Thread(m1,"线程1");
        Thread t2 = new Thread(m1,"线程2");

        System.out.println(t1.getPriority());
        System.out.println(t2.getPriority());

        t1.setPriority(1);
        t2.setPriority(10);
        t1.start();
        t2.start();
    }
}
